@import url(https://fonts.googleapis.com/css?family=Bree+Serif);
@keyframes in-top {
  from {
    transform: rotate3d(-1, 0, 0, 90deg);
  }
  to {
    transform: rotate3d(0, 0, 0, 0deg);
  }
}
@keyframes in-right {
  from {
    transform: rotate3d(0, -1, 0, 90deg);
  }
  to {
    transform: rotate3d(0, 0, 0, 0deg);
  }
}
@keyframes in-bottom {
  from {
    transform: rotate3d(1, 0, 0, 90deg);
  }
  to {
    transform: rotate3d(0, 0, 0, 0deg);
  }
}
@keyframes in-left {
  from {
    transform: rotate3d(0, 1, 0, 90deg);
  }
  to {
    transform: rotate3d(0, 0, 0, 0deg);
  }
}
@keyframes out-top {
  from {
    transform: rotate3d(0, 0, 0, 0deg);
  }
  to {
    transform: rotate3d(-1, 0, 0, 104deg);
  }
}
@keyframes out-right {
  from {
    transform: rotate3d(0, 0, 0, 0deg);
  }
  to {
    transform: rotate3d(0, -1, 0, 104deg);
  }
}
@keyframes out-bottom {
  from {
    transform: rotate3d(0, 0, 0, 0deg);
  }
  to {
    transform: rotate3d(1, 0, 0, 104deg);
  }
}
@keyframes out-left {
  from {
    transform: rotate3d(0, 0, 0, 0deg);
  }
  to {
    transform: rotate3d(0, 1, 0, 104deg);
  }
}
* {
  box-sizing: border-box;
}

body {
  background-color: #fff;
}

h1 {
  margin: 0 auto 5px;
  text-align: center;
}

.container {
  width: 840px;
  margin: 0 auto;
}

header {
  font-family: "Bree serif", serif;
  text-align: center;
  margin: 50px 0 25px;
  color: #34495e;
}
header p {
  margin: 0;
  color: rgba(52, 73, 94, 0.4);
}

.info {
  transform: rotate3d(1, 0, 0, 90deg);
  width: 100%;
  height: 100%;
  padding: 20px;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 4px;
  pointer-events: none;
  background-color: rgba(26, 188, 156, 0.9);
}
.info h3 {
  font-family: "Bree Serif", serif;
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}
.info p {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

ul {
  padding: 0;
  margin: 0 0 50px;
}
ul::after {
  content: "";
  display: table;
  clear: both;
}

li {
  position: relative;
  perspective: 400px;
  float: left;
  width: 200px;
  height: 200px;
  margin: 5px;
  padding: 0;
  list-style: none;
}
li a {
  display: inline-block;
  vertical-align: top;
  text-decoration: none;
  border-radius: 4px;
}
li .normal {
  width: 100%;
  height: 100%;
  background-color: #ecf0f1;
  color: rgba(52, 73, 94, 0.6);
  text-align: center;
  font-size: 50px;
  line-height: 200px;
  box-shadow: inset 0 2px 20px #e6ebed;
}
li .normal svg {
  pointer-events: none;
  width: 50px;
}
li .normal svg path {
  fill: rgba(52, 73, 94, 0.2);
}

.in-top .info {
  transform-origin: 50% 0;
  animation: in-top 300ms ease 0ms 1 forwards;
}

.in-right .info {
  transform-origin: 100% 0;
  animation: in-right 300ms ease 0ms 1 forwards;
}

.in-bottom .info {
  transform-origin: 50% 100%;
  animation: in-bottom 300ms ease 0ms 1 forwards;
}

.in-left .info {
  transform-origin: 0 0;
  animation: in-left 300ms ease 0ms 1 forwards;
}

.out-top .info {
  transform-origin: 50% 0;
  animation: out-top 300ms ease 0ms 1 forwards;
}

.out-right .info {
  transform-origin: 100% 0;
  animation: out-right 300ms ease 0ms 1 forwards;
}

.out-bottom .info {
  transform-origin: 50% 100%;
  animation: out-bottom 300ms ease 0ms 1 forwards;
}

.out-left .info {
  transform-origin: 0 0;
  animation: out-left 300ms ease 0ms 1 forwards;
}